bitkeeper revision 1.1159.1.338 (4187ca95yoh3y8SwBJw4uTmgIxLCTw)
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Tue, 2 Nov 2004 17:57:41 +0000 (17:57 +0000)
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>
Tue, 2 Nov 2004 17:57:41 +0000 (17:57 +0000)
A new install script to install from the intermediate 'install' subdir.
Also now a bit more careful in use of 'cp -a'. When installing to
system-wide directories we probably do not want to preserve ownership
of the random unprivileged user that originally built the binaries.
The user who does the install (probably root) is the correct person
to own the target files.

.rootkeys
Makefile
docs/Makefile
install.sh [new file with mode: 0755]

index 87b25357c1840a2692ef107a514e1f9a18d9148a..7f41bc10c83accd6d6042ff58f6358e32228da53 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
@@ -37,6 +37,7 @@
 3f815145CB8XdPUqsmhAjSDFuwOoqA extras/mini-os/mm.c
 3f815145vGYx1WY79voKkZB9yKwJKQ extras/mini-os/time.c
 3f815145xlKBAQmal9oces3G_Mvxqw extras/mini-os/traps.c
+4187ca95_eQN62ugV1zliQcfzXrHnw install.sh
 3e5a4e6589G-U42lFKs43plskXoFxQ linux-2.4.27-xen-sparse/Makefile
 3e5a4e65IEPjnWPZ5w3TxS5scV8Ewg linux-2.4.27-xen-sparse/arch/xen/Makefile
 3e5a4e65n-KhsEAs-A4ULiStBp-r6w linux-2.4.27-xen-sparse/arch/xen/boot/Makefile
index ab70b5d30f8158588aa9f04f0d2000cf03c9853b..d357cebf634233d6b72019fcbed3b154e4bc92d9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,8 @@ install: dist
        $(MAKE) -C xen install
        $(MAKE) -C tools install
        sh ./docs/check_pkgs && $(MAKE) -C docs install
-       $(shell cp -a install/boot/*$(LINUX_VER)* /boot/)
-       $(shell cp -a install/lib/modules/* /lib/modules/)
+       $(shell cp -dR install/boot/*$(LINUX_VER)* /boot/)
+       $(shell cp -dR install/lib/modules/* /lib/modules/)
 
 # install xen and tools into the install directory
 dist: all
index ed7a1d3575f2d86bdc257e2a41db84da8f31b352..528c4f53f27e0b9307af59915a018cbeaef101c0 100644 (file)
@@ -23,9 +23,9 @@ clean:
 
 install: all
        mkdir -p $(prefix)/usr/share/doc/xen
-       cp -a ps $(prefix)/usr/share/doc/xen
-       cp -a pdf $(prefix)/usr/share/doc/xen
-       cp -a html $(prefix)/usr/share/doc/xen
+       cp -dR ps $(prefix)/usr/share/doc/xen
+       cp -dR pdf $(prefix)/usr/share/doc/xen
+       cp -dR html $(prefix)/usr/share/doc/xen
 
 pdf/%.pdf: ps/%.ps
        mkdir -p pdf ; ps2pdf $< $@
diff --git a/install.sh b/install.sh
new file mode 100755 (executable)
index 0000000..2c8f38f
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if ! [ -d ./install ]; then
+  echo "ERROR: You must build Xen before it can be installed."
+  echo "       For example, 'make dist'."
+  exit 1
+fi
+
+prefix='/'
+if [ $# -ne 0 ]; then 
+  prefix=$1
+fi
+
+if ! [ -d $prefix ]; then
+  echo "ERROR: You must specify a valid install directory."
+  echo "       The specified directory '$prefix' is not valid."
+  exit 1
+fi
+
+echo "Installing Xen to '$prefix'..."
+cp -fdR ./install/* $prefix
+echo "All done."
+
+exit 0